Curry: A Truly Functional Logic Language

نویسندگان

  • Michael Hanus
  • Herbert Kuchen
چکیده

Functional and logic programming are the most important declarative programming paradigms, and interest in combining them has grown over the last decade. However, integrated functional logic languages are currently not widely used. This is due to the fact that the operational principles are not well understood and many diierent evaluation strategies have been proposed which resulted in many diierent functional logic languages. To overcome this situation, we propose the functional logic language Curry which can deal as a standard language in this area. It includes important ideas of existing functional logic languages and recent developments, and combines the most important features of functional and logic languages. Thus, Curry can be the basis to combine the currently separated research eeorts of the functional and logic programming communities and to boost declarative programming in general. Moreover, since functions provide for more eecient evaluation strategies and are a declarative replacement of some impure features of Prolog (in particular, pruning operators), Curry can be also used as a declarative successor of Prolog. 1 Motivation During the last decade, many proposals have been made to combine the most important declarative programming paradigms (see 13] for a survey). Functional logic languages ooer features from functional programming (reduction of nested expressions, higher-order functions) and logic programming (logical variables, partial data structures, search for solutions). Compared to pure functional languages, functional logic languages have more expressive power due to the use of logical variables and built-in search mechanisms. Compared to pure logic languages, functional logic languages have more eecient evaluation mechanisms due to the (deterministic!) reduction of functional expressions. Thus, impure features of Prolog to restrict the search space, like the cut operator, can be avoided in functional logic languages. However, there is no obvious way to combine the search facilities of logic programming with eecient evaluation principles of functional programming. As a consequence, quite diierent methods to integrate functional and logic languages have been proposed in the past. The most promising operational principles are residuation and narrowing. Residuation is based on the idea to delay function calls until they are ready for deterministic evaluation. The residuation principle is used, for instance, in the languages Escher 19], Le Fun 2], Life 1], NUE-Prolog 27], and Oz 33]. Since the residuation principle evaluates function calls by deterministic reduction steps, nondeterministic search must be explicitly encoded by predicates

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Functional Logic Programming: From Theory to Curry

Functional logic programming languages combine the most important declarative programming paradigms, and attempts to combine these paradigms have a long history. The declarative multi-paradigm language Curry is influenced by recent advances in the foundations and implementation of functional logic languages. The development of Curry is an international initiative intended to provide a common pl...

متن کامل

Curry without Success

Curry is a successful, general-purpose, functional logic programming language that predefines a singleton type Success explicitly to support its logic component. We take the likely-controversial position that without Success Curry would be as much logic or more. We draw a short history and motivation for the existence of this type and justify why its elimination could be advantageous. Furthermo...

متن کامل

UPV-CURRY: An Incremental CURRY Interpreter

Functional logic programming integrates the best features of modern functional and logic languages. The multi-paradigm declarative language Curry is an extension of Haskell which is intended to become a standard in the area. In this paper, we present UPV-Curry, an eecient and quite complete implementation of Curry based on a new, incremental deenition of its basic evaluation mechanism. We compa...

متن کامل

A Functional Logic Programming Approach to Graphical User Interfaces

We show how the features of modern integrated functional logic programming languages can be exploited to implement graphical user interfaces (GUIs) in a high-level declarative style. For this purpose, we have developed a GUI library in Curry, a multi-paradigm language amalgamating functional, logic, and concurrent programming principles. The functional features of Curry are exploited to deene t...

متن کامل

A Concurrent Implementation of Curry in Java

Curry is a multi-paradigm declarative language aiming to amalgamate functional, logic, and concurrent programming paradigms. Curry combines in a seamless way features from functional programming and (concurrent) logic programming. Curry's operational semantics is based on the combination of lazy reduction of expressions together with a possibly non-deterministic binding of free variables occurr...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1995